package day230327;

import java.util.Scanner;

/**
 * @author 兴趣使然黄小黄
 * @version 1.0
 * @date 2023/3/28 10:18
 */
public class Main2 {

    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int a = scan.nextInt(); // 输入 A
        int b = scan.nextInt(); // 输入 B
        // 求 A B 的最小公倍数 lcm = (A * B) / greatestCommonFactor(最大公因数)
        int gcf = gcd(a, b);
        int lcm = (a * b) / gcf;
        System.out.print(lcm);
        scan.close();
    }

    // 辗转相除法求最大公因数
    private static int gcd(int a, int b) {
        // 3 9
        // 3 % 9 = 3
        // 9 % 3 = 0
        // 3 % 0 =>> 3
        while (b != 0) {
            int c = a % b;
            a = b;
            b = c;
        }
        return a;
    }
}
